package com.ambitor.ipro.util;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PropertiesReaderForPic {

	private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
			.getBundle("app_picture");
	
	private static final Logger logger = LoggerFactory
			.getLogger(PropertiesReaderForPic.class);

	private PropertiesReaderForPic() {
	}

	@SuppressWarnings("unchecked")
	public static String getString(String key) {
		if (key == null)
			return null;
		try {
			String value = RESOURCE_BUNDLE.getString(key);
			if (value == null) {
				logger.warn(key + "==null");
			}
			return value;
		} catch (MissingResourceException e) {
			return null;
		}
	}

	public static void main(String[] args) {
		System.out.println(PropertiesReaderForPic.getString("p_by"));
	}
}
